package com.warehouse.mapper;

import com.warehouse.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ProductMapper {
    
    List<Product> selectAll();
    
    Product selectById(@Param("id") Long id);
    
    List<Product> selectByCategory(@Param("category") String category);
    
    List<Product> selectByProductName(@Param("productName") String productName);
    
    List<Product> selectLowStock();
    
    int insert(Product product);
    
    int update(Product product);
    
    int updateStock(@Param("id") Long id, @Param("quantity") Integer quantity);
    
    int deleteById(@Param("id") Long id);
    
    long countAll();
} 